﻿#ifndef DATAFORM_H
#define DATAFORM_H

#include <QWidget>
#include <QScrollBar>
#include <SqliteUtil/sqliteutil.h>
#include "workhisform.h"

namespace Ui {
class DataForm;
}

class DataForm : public QWidget
{
    Q_OBJECT

public:
    explicit DataForm(QWidget *parent = nullptr);
    ~DataForm();

    void setBatchPage();
    void iniPage();
signals:
    void sendBatchInfo(int batchId);
public slots:
    void OnSlideAction(int nRowIndex);
    void slotsDlgInfo();
private slots:
    void on_Bt_PrePage_clicked();

    void on_Bt_NextPage_clicked();

    void on_Bt_Delete_clicked();

    void on_Bt_Search_clicked();

    void on_tableWidget_cellClicked(int row, int column);

    void on_Bt_Confirm_clicked();

    void on_Bt_Return_clicked();

    void on_tableWidget_cellDoubleClicked(int row, int column);

    void on_plan_cBox_activated(int index);

    void on_customer_cBox_activated(int index);

    void on_Bt_Query_clicked();

    void on_Bt_Add_clicked();

private:
    Ui::DataForm *ui;

    WorkHisForm *m_pHistroyDataForm;

    QVector<int> m_vecData;

    int m_nCurPage; //当前页数
    int m_nRowsPerPage; // 每页显示的行数
    int m_nTotalPages;  // 表格总页数

    QString m_strCurID;
    bool m_bDB;


    int m_nCustomerId;
    int m_nPlanId;

};

#endif // DATAFORM_H
